package com.jungle.app.domain.entity;

import com.jungle.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "jw_spot_review")
@org.hibernate.annotations.Table(appliesTo = "jw_spot_review", comment = "景点评价表")
@Where(clause = "deleted is null or deleted != true")
@SQLDelete(sql = "update jw_spot_review set deleted = true where id = ? ")
public class JwSpotReview extends BaseEntity {
    // 评分
    @Column(name = "Rating")
    @Comment("评分")
    private String rating;

    // 景点ID
    @Column(name = "ScenicSpotID")
    @Comment("景点ID")
    private String scenicSpotID;

    // 用户ID
    @Column(name = "UserID")
    @Comment("用户ID")
    private String userID;

    // 评论内容
    @Column(name = "Content")
    @Comment("评论内容")
    private String content;

    // 评价时间
    @Column(name = "Time")
    @Comment("评价时间")
    private LocalDateTime time;

    // 点赞数
    @Column(name = "Likes")
    @Comment("点赞数")
    private int likes;

    // 举报数
    @Column(name = "Reports")
    @Comment("举报数")
    private int reports;

    // 是否匿名
    @Column(name = "IsAnonymous")
    @Comment("是否匿名")
    private boolean isAnonymous;

    // 审核状态
    @Column(name = "Status")
    @Comment("审核状态")
    private String status;

}
